package com.hzjh.h5mall.ui.web

import android.view.View
import android.widget.FrameLayout
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.hzjh.base.ext.frame.JHBaseVM
import com.hzjh.base.ext.route.RouteUrl
import com.hzjh.h5mall.databinding.ActivityWebBinding
@Route(path = RouteUrl.WEB_ACTIVITY)
class WebActivity : JHBaseWebActivity<ActivityWebBinding, JHBaseVM>() {
    @JvmField
    @Autowired(name = RouteUrl.PARAMS_WEB_BAR_VISIBILITY)
    var mWebBarVisibility: Boolean = false

    @JvmField
    @Autowired(name = RouteUrl.PARAMS_WEB_TITLE_BAR_VISIBILITY)
    var mWebTitleBarVisibility: Boolean = false

    override fun initView() {
        super.initView()
        viewBinding.langBarTop.setStatusBarVisibility(if(mWebBarVisibility) View.VISIBLE else View.GONE)
        viewBinding.langBarTop.setTitleBarVisibility(if(mWebTitleBarVisibility) View.VISIBLE else View.GONE)
    }

    override fun getWebFlContent(): FrameLayout {
        return viewBinding.flContent
    }

    override fun initViewBinding(): ActivityWebBinding {
        return ActivityWebBinding.inflate(layoutInflater)
    }
}